#pragma once
#include<stdio.h>
#include<ctype.h>

#define Fflush_now 1
#define Fflush_line 2
#define Fflush_full 4

#define LINE_SIZE 1024
struct my_file
{
    int flag;
    int fileno;

    char cache[LINE_SIZE];
    int cpa;
    int pos;
};

typedef struct my_file my_file;

my_file* my_fopen(const char* path, const char* flag);
size_t  my_fwrite(my_file* fp,const char* data,size_t len);
void my_fclose(my_file* fp);

void  my_fflush(my_file* fp);

